package com.victor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.victor.dao.CommentsDao;
import com.victor.entity.comments.CommentPhoto;
import com.victor.entity.comments.Comments;
import com.victor.entity.praise.CommentsPraise;
import com.victor.entity.toreport.ToReport;
import com.victor.entity.toreport.ToreportPhoto;
import com.victor.service.CommentsService;
@Service
public class CommentsServiceImpl implements CommentsService {
	@Autowired
	private CommentsDao dao;

	@Override
	public List<Comments> selCommentsByTypeAndPid(String type, String pid, String uid,String flag) {
		return dao.selCommentsByTypeAndPid(type,pid,uid,flag);
	}

	@Override
	public List<Comments> selCommentsByFid(Integer id, String uid) {
		return dao.selCommentsByFid(id,uid);
	}

	@Override
	public CommentsPraise selCommentsPriaeByCidAndUid(String commentid, String uid) {
		return dao.selCommentsPriaeByCidAndUid(commentid,uid);
	}

	@Override
	public boolean insertCommentsPraise(CommentsPraise commentsPraise) {
		return dao.insertCommentspraise(commentsPraise);
	}

	@Override
	public String selCommentsPraiseByCid(String commentid) {
		return dao.selCommentsPraiseByCid(commentid);
	}

	@Override
	public boolean delCommentsPraise(Integer id) {
		return dao.deleteCommentsPraise(id);
	}

	@Override
	public boolean insertComments(Comments comments) {
		return dao.insertCommets(comments);
	}

	@Override
	public boolean insertCommentsPhoto(CommentPhoto commentPhoto) {
		return dao.insertCommentsPhoto(commentPhoto);
	}

	@Override
	public boolean insertToReport(ToReport toReport) {
		return dao.insertToReport(toReport);
	}

	@Override
	public boolean insertToReportPhoto(ToreportPhoto toreportPhoto) {
		return dao.insertToReportPhoto(toreportPhoto);
	}

}
